package ai.people.platform.archives.service;

import ai.people.netmon.framework.domain.archives.request.ArchivesAddAllRequest;
import ai.people.netmon.framework.domain.archives.request.ArchivesUpdateAllRequest;
import ai.people.netmon.framework.domain.graph.FrontGraphBase;
import ai.people.netmon.framework.domain.archives.vo.ArchivesGraph;

import java.util.Map;

/**
 * @author zhenglin
 * @date 2022/4/8
 */
public interface GraphService {

    /**
     * 获取node属性信息
     *
     * @param vid vid
     * @return {@link ArchivesGraph.Node}
     * @throws Exception 异常
     */
    ArchivesGraph.Node getNodeVo(String vid) throws Exception;

    /**
     * 档案路径
     *
     * @param id               id
     * @param hideArchivesInfo 隐藏档案信息
     * @return {@link ArchivesGraph}
     * @throws Exception 异常
     */
    ArchivesGraph archivesPath(Long id, boolean hideArchivesInfo) throws Exception;


    /**
     * 得到边缘映射
     *
     * @return {@link Map}<{@link String}, {@link String}>
     */
    Map<String, String> getEdgeMapping();


    /**
     * 检查图
     *
     * @param archivesGraph 档案图
     * @return boolean
     */
    boolean checkGraph(FrontGraphBase archivesGraph);

    /**
     * 保存所有
     * 保存
     *
     * @param all 所有
     * @return {@link String}
     * @throws Exception 异常
     */
    String saveAll(ArchivesAddAllRequest all) throws Exception;

    /**
     * 更新所有
     * 修改档案+图
     *
     * @param all 所有
     * @throws Exception 异常
     */
    void updateAll(ArchivesUpdateAllRequest all) throws Exception;

}
